import { httpRequest } from "@/utils/https.js"
import {baseUrl} from "@/utils/basic.js"
//地址列表
export const userAddress = (username,id) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=userAddress', {
		username,
		id
	},'get')
//新增编辑地址
export const saveUserAddress = (data) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=saveUserAddress', data,'post')
//删除地址
export const deleteUserAddress = (username,id) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=deleteUserAddress', {
        username,
        id
    },'post')    
//设置默认地址
export const setDefaultAddress = (username,id) =>
	httpRequest(baseUrl+'index.php?m=api&c=wxapp&a=setDefaultAddress', {
        username,
        id
    },'post')   